package com.cy.listener;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.ImageIcon;
import javax.swing.JLabel;

import com.cy.controller.MasterController;
import com.cy.controller.MusicController;

public class BackListener extends MouseAdapter {

	@Override
	public void mousePressed(MouseEvent e) {
		JLabel jl = (JLabel)e.getComponent();
		jl.setIcon(new ImageIcon("image/back_press.jpg"));
	}

	@Override
	public void mouseReleased(MouseEvent e) {
		JLabel jl = (JLabel)e.getComponent();
		jl.setIcon(new ImageIcon("image/back.jpg"));
		//悔棋
		MasterController.back();
		MusicController.playSelect();
	}
}
